package com.sunwayhorizo.health.hl7.persistent;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


@Entity
@NamedQuery(name = "RimCoreEdRefTelUses.findAll", query = "select o from RimCoreEdRefTelUses o")
@Table(name = "RIM_CORE_ED_REF_TEL_USES")
public class RimCoreEdRefTelUses implements Serializable {
    @Id
    @Column(name="ED_ID", nullable = false, insertable = false, updatable = false)    private Long edId;
    @Column(name="ED_REF_TEL_USE_CODE", nullable = false)    private String use;
    
    @ManyToOne
    @JoinColumn(name = "ED_ID")    private RimCoreEds rimCoreEds;

    public RimCoreEdRefTelUses() {
    }

    public Long getEdId() {
        return edId;
    }

    public void setEdId(Long edId) {
        this.edId = edId;
    }

    public String getUse() {
        return use;
    }

    public void setUse(String edRefTelUseCode) {
        this.use = edRefTelUseCode;
    }

    public RimCoreEds getRimCoreEds() {
        return rimCoreEds;
    }

    public void setRimCoreEds(RimCoreEds rimCoreEds) {
        this.rimCoreEds = rimCoreEds;
        this.edId = rimCoreEds.getEdId();
    }
}
